import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { Outlet,Link,NavLink,RouterProvider } from "react-router-dom";
// import { Tabs } from 'antd';

import instance from "./apis/request.js";
import { Tabs } from 'react-vant'

// const [data,setData]=useState([])

import {router}  from "./router/index.tsx";


const aa=async()=>{
await instance.get('/article/list',{
  params:{
    page:1,
    pageSize:10
  }
}).then(res=>{
  console.log('111');
  
  console.log(res.data)
})
}
const onChange = (key:string) => {
  console.log(key);
};

function App() {
  const items = [
  {
    
    title:'都是对的收到',
    title2:"发个胡恶搞",
    title3:"和人工胡歌",
    title4:"通过内热热热我"
    
  },
  {
    
    title:'i火速如果胡思',
    title2:"人员变动发给别人",
    title3:"有难同当办公设备同人本",
    title4:"打扰你约怒家人"
    
  },
  {
    
    title:'热压机呢二姨太八个人',
    title2:"人体就会软件园",
    title3:"同意染色体还不如",
    title4:"日本人演的"
    
  },
  {
    
    title:'人员那边v发v额v我凤娃',
    title2:"恶徒特么天",
    title3:"恶徒特依据",
    title4:"而合同化"
    
  },
  
];
  

  return (
    
      // <Tabs defaultActiveKey="1" items={items} onChange={onChange} >
      //   {/* <Outlet /> */}
      // </Tabs>
      // <div>11
      // <header>
      //   <Tabs defaultActiveKey="1"  >
      //    <Tabs><Link to="/rsb">热搜榜</Link></Tabs>
      //  </Tabs>
      //   {/* <ul>
      //     <li><NavLink to="/rsb">热搜榜</NavLink></li>
      //     <li><NavLink to="/bjb">北京榜</NavLink></li>
      //     <li><NavLink to="/msb">民生榜</NavLink></li>
      //     <li><NavLink to="/cjb">财经榜</NavLink></li>
      //   </ul> */}
      // </header>
      // <main><Outlet></Outlet></main>

      // </div>
      <Tabs defaultActive={0}>
        
          <Tabs.TabPane  title={`北京榜`}>
            {items.map((v,i)=>{
              return <p key={i}>{v.title}</p>
            })}
          </Tabs.TabPane>
          <Tabs.TabPane  title={`热搜榜`}>
            {items.map((v,i)=>{
              return <p key={i}>{v.title2}</p>
            })}
          </Tabs.TabPane>
          <Tabs.TabPane  title={`民生榜`}>
            {items.map((v,i)=>{
              return <p key={i}>{v.title3}</p>
            })}
          </Tabs.TabPane>
          <Tabs.TabPane  title={`财经榜`}>
            {items.map((v,i)=>{
              return <p key={i}>{v.title4}</p>
            })}
          </Tabs.TabPane>
        
      </Tabs>
    
  )
}

export default App
